<?php

namespace app\admin\model;

use think\Controller;
use think\Db;
use think\Model;

class login extends Model
{
    public function login($name, $pwd) // 传递两个参数
    {
        $result = Db::table('parenting_adminuser')
            ->field('id,name')
            ->where([
                'name'=> $name,
                'password' => md5($pwd)
            ])
            ->find();
        if ($result) {
            return true;
        } else {
            return false;
        }
    }


}
